<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Crawler: Source/Crawler/Application.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Crawler
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_application_8cpp_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Application.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_application_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_application_8hpp.html">Crawler/Application.hpp</a>&gt;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;</div>
<div class="line"><a name="l00003"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#acf656ce91b631690e20404f6b4d01f7f">    3</a></span>&#160;<a class="code" href="class_crawler_1_1_application.html#acf656ce91b631690e20404f6b4d01f7f">Crawler::Application::Application</a> ( ) :</div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;    websiteManager ( * this ) ,</div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;    workerManager ( * this )</div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;{</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;}</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#aec89860e70e9f040f5468fc233144cae">    9</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#aec89860e70e9f040f5468fc233144cae">Crawler::Application::setRunning</a> ( <span class="keywordtype">bool</span> running )</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;{</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;    this-&gt;running = running ;</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;}</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a09ab3c80a3677f69b6ba6f6a81367ce6">   14</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#a09ab3c80a3677f69b6ba6f6a81367ce6">Crawler::Application::isRunning</a> ( )<span class="keyword"> const</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <span class="keywordflow">return</span> this-&gt;running ;</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;}</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#acff7506553bf1a55dced63c1d0b1c2e4">   19</a></span>&#160;<a class="code" href="class_crawler_1_1_website_manager.html">Crawler::WebsiteManager</a> &amp; <a class="code" href="class_crawler_1_1_application.html#acff7506553bf1a55dced63c1d0b1c2e4">Crawler::Application::getWebsiteManager</a> ( )</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="keywordflow">return</span> this-&gt;websiteManager ;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;}</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a08d275f1722533ab7ea40b276b3ee712">   23</a></span>&#160;<span class="keyword">const</span> <a class="code" href="class_crawler_1_1_website_manager.html">Crawler::WebsiteManager</a> &amp; <a class="code" href="class_crawler_1_1_application.html#acff7506553bf1a55dced63c1d0b1c2e4">Crawler::Application::getWebsiteManager</a> ( )<span class="keyword"> const</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="keywordflow">return</span> this-&gt;websiteManager ;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;}</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;            </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#aae5500b115428bbe7de9c0451fd3b556">   28</a></span>&#160;<a class="code" href="class_crawler_1_1_worker_manager.html">Crawler::WorkerManager</a> &amp; <a class="code" href="class_crawler_1_1_application.html#aae5500b115428bbe7de9c0451fd3b556">Crawler::Application::getWorkerManager</a> ( )</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keywordflow">return</span> this-&gt;workerManager ;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;}</div>
<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#adb00513d242574057f14d71b60e152bf">   32</a></span>&#160;<span class="keyword">const</span> <a class="code" href="class_crawler_1_1_worker_manager.html">Crawler::WorkerManager</a> &amp; <a class="code" href="class_crawler_1_1_application.html#aae5500b115428bbe7de9c0451fd3b556">Crawler::Application::getWorkerManager</a> ( )<span class="keyword"> const</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keywordflow">return</span> this-&gt;workerManager ;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;}</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a0c1b381f01f73dacb6493043302136ae">   37</a></span>&#160;<span class="keywordtype">int</span> <a class="code" href="class_crawler_1_1_application.html#a0c1b381f01f73dacb6493043302136ae">Crawler::Application::main</a> ( <span class="keyword">const</span> std::vector &lt;std::string&gt; &amp; arguments )</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;{</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    this-&gt;arguments = arguments ;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keywordflow">if</span> ( ! this-&gt;onStartup ( ) )</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="keywordflow">return</span> -1 ;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    this-&gt;workerManager.spawnWorker ( ) ;</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keywordflow">while</span> ( this-&gt;isRunning ( ) )</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    {</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        this-&gt;onMain ( ) ;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    }</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    this-&gt;workerManager.despawnWorker ( ) ;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        </div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    this-&gt;onShutdown ( ) ;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">return</span> 0 ;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;}</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a4db5d3f489384149ec89be2d9a862277">   58</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#a4db5d3f489384149ec89be2d9a862277">Crawler::Application::onStartup</a> ( )</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;{</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;}</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a3f5866fdfdfd85b3ce2d192eef7efd32">   63</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#a3f5866fdfdfd85b3ce2d192eef7efd32">Crawler::Application::onMain</a> ( )</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;{</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;}</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a544d41cc0fb2b5f36b44480ea4a3b14f">   67</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#a544d41cc0fb2b5f36b44480ea4a3b14f">Crawler::Application::onShutdown</a> ( )</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;{</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;}</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a7fe762aa7cd9d776ef593f690fd7d516">   71</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#a7fe762aa7cd9d776ef593f690fd7d516">Crawler::Application::onSpawnWorker</a> ( <a class="code" href="class_crawler_1_1_worker.html">Crawler::Worker</a> &amp; worker )</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;{</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;}</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#aa6bc95edeb44f9338224862365c812d5">   75</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#aa6bc95edeb44f9338224862365c812d5">Crawler::Application::onDespawnWorker</a> ( <a class="code" href="class_crawler_1_1_worker.html">Crawler::Worker</a> &amp; worker )</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;{</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;}</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#af9735a84f3ed01419a14e9dc584bd238">   79</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#af9735a84f3ed01419a14e9dc584bd238">Crawler::Application::onUnsupportedProtocol</a> ( <a class="code" href="class_crawler_1_1_worker.html">Crawler::Worker</a> &amp; worker , <a class="code" href="class_crawler_1_1_website.html">Crawler::Website</a> &amp; website )</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;{</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    website.<a class="code" href="class_crawler_1_1_website.html#ac9e3218e95e4121b730958d6f4d5ab88">setVisited</a> ( <span class="keyword">true</span> ) ;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;}</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a1d3c8c2d7f226d33601e96ede098976a">   84</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#a1d3c8c2d7f226d33601e96ede098976a">Crawler::Application::onRequest</a> ( <a class="code" href="class_crawler_1_1_worker.html">Crawler::Worker</a> &amp; worker , <a class="code" href="class_crawler_1_1_website.html">Crawler::Website</a> &amp; website , <a class="code" href="class_crawler_1_1_link.html">Crawler::Link</a> &amp; link , sf::Http &amp; client , sf::Http::Request &amp; request )</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;{</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;}</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#af1ad5bb1ae7ce57444e5a234fe0582a8">   89</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#af1ad5bb1ae7ce57444e5a234fe0582a8">Crawler::Application::onResponse</a> ( <a class="code" href="class_crawler_1_1_worker.html">Crawler::Worker</a> &amp; worker , <a class="code" href="class_crawler_1_1_website.html">Crawler::Website</a> &amp; website , <a class="code" href="class_crawler_1_1_link.html">Crawler::Link</a> &amp; link , sf::Http &amp; client , sf::Http::Response &amp; response )</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;{</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;}</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a43048018281b44cedeb943d856c2bbad">   94</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#a43048018281b44cedeb943d856c2bbad">Crawler::Application::onParsing</a> ( <a class="code" href="class_crawler_1_1_worker.html">Crawler::Worker</a> &amp; worker , <a class="code" href="class_crawler_1_1_website.html">Crawler::Website</a> &amp; website , <a class="code" href="class_crawler_1_1_link.html">Crawler::Link</a> &amp; link , pugi::xml_document &amp; document )</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;{</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#acb987ee8ae6f0e6e7f9b1092dd7a4f3f">   99</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#acb987ee8ae6f0e6e7f9b1092dd7a4f3f">Crawler::Application::onReportLink</a> ( <span class="keyword">const</span> std::string &amp; <span class="keywordtype">string</span> )</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;{</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#abdbdf57a6da5d52a8f7b4fb0e87fb422">  104</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#abdbdf57a6da5d52a8f7b4fb0e87fb422">Crawler::Application::onAddWebsite</a> ( <a class="code" href="class_crawler_1_1_website.html">Crawler::Website</a> &amp; website )</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        </div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a97037c34bec5f50bd7bf1f56456ea555">  109</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="class_crawler_1_1_application.html#a97037c34bec5f50bd7bf1f56456ea555">Crawler::Application::onAddLink</a> ( <a class="code" href="class_crawler_1_1_website.html">Crawler::Website</a> &amp; website , <a class="code" href="class_crawler_1_1_link.html">Crawler::Link</a> &amp; link )</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;{</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="keywordflow">return</span> true ;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#a45cd98a249e0f0b2755d1acf94c7fa1a">  114</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="class_crawler_1_1_application.html#a45cd98a249e0f0b2755d1acf94c7fa1a">Crawler::Application::onVisitedWebsites</a> ( )</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    this-&gt;setRunning ( <span class="keyword">false</span> ) ;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;}</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div>
<div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="class_crawler_1_1_application.html#ad22222189cada456cad856bcce6b8f32">  119</a></span>&#160;<span class="keyword">const</span> std::vector &lt;std::string&gt; &amp; <a class="code" href="class_crawler_1_1_application.html#ad22222189cada456cad856bcce6b8f32">Crawler::Application::getArguments</a> ( )<span class="keyword"> const</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword"></span>{</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordflow">return</span> this-&gt;arguments ;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;}</div>
<div class="ttc" id="class_crawler_1_1_application_html_abdbdf57a6da5d52a8f7b4fb0e87fb422"><div class="ttname"><a href="class_crawler_1_1_application.html#abdbdf57a6da5d52a8f7b4fb0e87fb422">Crawler::Application::onAddWebsite</a></div><div class="ttdeci">virtual bool onAddWebsite(Crawler::Website &amp;website)</div><div class="ttdoc">Gets called when a new website is added. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00104">Application.cpp:104</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_af9735a84f3ed01419a14e9dc584bd238"><div class="ttname"><a href="class_crawler_1_1_application.html#af9735a84f3ed01419a14e9dc584bd238">Crawler::Application::onUnsupportedProtocol</a></div><div class="ttdeci">virtual void onUnsupportedProtocol(Crawler::Worker &amp;worker, Crawler::Website &amp;website)</div><div class="ttdoc">Gets called when an unsupported protocol is accessed. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00079">Application.cpp:79</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a3f5866fdfdfd85b3ce2d192eef7efd32"><div class="ttname"><a href="class_crawler_1_1_application.html#a3f5866fdfdfd85b3ce2d192eef7efd32">Crawler::Application::onMain</a></div><div class="ttdeci">virtual void onMain()</div><div class="ttdoc">Gets called inside the main function. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00063">Application.cpp:63</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_acb987ee8ae6f0e6e7f9b1092dd7a4f3f"><div class="ttname"><a href="class_crawler_1_1_application.html#acb987ee8ae6f0e6e7f9b1092dd7a4f3f">Crawler::Application::onReportLink</a></div><div class="ttdeci">virtual bool onReportLink(const std::string &amp;string)</div><div class="ttdoc">Gets called when a Link is reported. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00099">Application.cpp:99</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_acf656ce91b631690e20404f6b4d01f7f"><div class="ttname"><a href="class_crawler_1_1_application.html#acf656ce91b631690e20404f6b4d01f7f">Crawler::Application::Application</a></div><div class="ttdeci">Application()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00003">Application.cpp:3</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a0c1b381f01f73dacb6493043302136ae"><div class="ttname"><a href="class_crawler_1_1_application.html#a0c1b381f01f73dacb6493043302136ae">Crawler::Application::main</a></div><div class="ttdeci">int main(const std::vector&lt; std::string &gt; &amp;arguments)</div><div class="ttdoc">Applications entry point. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00037">Application.cpp:37</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a45cd98a249e0f0b2755d1acf94c7fa1a"><div class="ttname"><a href="class_crawler_1_1_application.html#a45cd98a249e0f0b2755d1acf94c7fa1a">Crawler::Application::onVisitedWebsites</a></div><div class="ttdeci">virtual void onVisitedWebsites()</div><div class="ttdoc">Gets called when all websites has been visited. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00114">Application.cpp:114</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_ad22222189cada456cad856bcce6b8f32"><div class="ttname"><a href="class_crawler_1_1_application.html#ad22222189cada456cad856bcce6b8f32">Crawler::Application::getArguments</a></div><div class="ttdeci">const std::vector&lt; std::string &gt; &amp; getArguments() const </div><div class="ttdoc">Returns command line arguments. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00119">Application.cpp:119</a></div></div>
<div class="ttc" id="class_crawler_1_1_website_html"><div class="ttname"><a href="class_crawler_1_1_website.html">Crawler::Website</a></div><div class="ttdef"><b>Definition:</b> <a href="_website_8hpp_source.html#l00014">Website.hpp:14</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_aae5500b115428bbe7de9c0451fd3b556"><div class="ttname"><a href="class_crawler_1_1_application.html#aae5500b115428bbe7de9c0451fd3b556">Crawler::Application::getWorkerManager</a></div><div class="ttdeci">Crawler::WorkerManager &amp; getWorkerManager()</div><div class="ttdoc">Returns worker manager. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00028">Application.cpp:28</a></div></div>
<div class="ttc" id="class_crawler_1_1_worker_manager_html"><div class="ttname"><a href="class_crawler_1_1_worker_manager.html">Crawler::WorkerManager</a></div><div class="ttdef"><b>Definition:</b> <a href="_worker_manager_8hpp_source.html#l00013">WorkerManager.hpp:13</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a43048018281b44cedeb943d856c2bbad"><div class="ttname"><a href="class_crawler_1_1_application.html#a43048018281b44cedeb943d856c2bbad">Crawler::Application::onParsing</a></div><div class="ttdeci">virtual bool onParsing(Crawler::Worker &amp;worker, Crawler::Website &amp;website, Crawler::Link &amp;link, pugi::xml_document &amp;document)</div><div class="ttdoc">Gets called when the document is parsed. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00094">Application.cpp:94</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_aec89860e70e9f040f5468fc233144cae"><div class="ttname"><a href="class_crawler_1_1_application.html#aec89860e70e9f040f5468fc233144cae">Crawler::Application::setRunning</a></div><div class="ttdeci">void setRunning(bool running)</div><div class="ttdoc">Changes if application is running. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00009">Application.cpp:9</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a97037c34bec5f50bd7bf1f56456ea555"><div class="ttname"><a href="class_crawler_1_1_application.html#a97037c34bec5f50bd7bf1f56456ea555">Crawler::Application::onAddLink</a></div><div class="ttdeci">virtual bool onAddLink(Crawler::Website &amp;website, Crawler::Link &amp;link)</div><div class="ttdoc">Gets called when a new link to a website is added. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00109">Application.cpp:109</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a4db5d3f489384149ec89be2d9a862277"><div class="ttname"><a href="class_crawler_1_1_application.html#a4db5d3f489384149ec89be2d9a862277">Crawler::Application::onStartup</a></div><div class="ttdeci">virtual bool onStartup()</div><div class="ttdoc">Gets called when application starts up. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00058">Application.cpp:58</a></div></div>
<div class="ttc" id="class_crawler_1_1_website_manager_html"><div class="ttname"><a href="class_crawler_1_1_website_manager.html">Crawler::WebsiteManager</a></div><div class="ttdef"><b>Definition:</b> <a href="_website_manager_8hpp_source.html#l00012">WebsiteManager.hpp:12</a></div></div>
<div class="ttc" id="class_crawler_1_1_link_html"><div class="ttname"><a href="class_crawler_1_1_link.html">Crawler::Link</a></div><div class="ttdoc">Utility class which represents a link. </div><div class="ttdef"><b>Definition:</b> <a href="_link_8hpp_source.html#l00012">Link.hpp:12</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a09ab3c80a3677f69b6ba6f6a81367ce6"><div class="ttname"><a href="class_crawler_1_1_application.html#a09ab3c80a3677f69b6ba6f6a81367ce6">Crawler::Application::isRunning</a></div><div class="ttdeci">bool isRunning() const </div><div class="ttdoc">Returns if application is running. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00014">Application.cpp:14</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_af1ad5bb1ae7ce57444e5a234fe0582a8"><div class="ttname"><a href="class_crawler_1_1_application.html#af1ad5bb1ae7ce57444e5a234fe0582a8">Crawler::Application::onResponse</a></div><div class="ttdeci">virtual bool onResponse(Crawler::Worker &amp;worker, Crawler::Website &amp;website, Crawler::Link &amp;link, sf::Http &amp;client, sf::Http::Response &amp;response)</div><div class="ttdoc">Gets called when a HTTP response is received. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00089">Application.cpp:89</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a7fe762aa7cd9d776ef593f690fd7d516"><div class="ttname"><a href="class_crawler_1_1_application.html#a7fe762aa7cd9d776ef593f690fd7d516">Crawler::Application::onSpawnWorker</a></div><div class="ttdeci">virtual void onSpawnWorker(Crawler::Worker &amp;worker)</div><div class="ttdoc">Gets called when a worker spawns. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00071">Application.cpp:71</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a1d3c8c2d7f226d33601e96ede098976a"><div class="ttname"><a href="class_crawler_1_1_application.html#a1d3c8c2d7f226d33601e96ede098976a">Crawler::Application::onRequest</a></div><div class="ttdeci">virtual bool onRequest(Crawler::Worker &amp;worker, Crawler::Website &amp;website, Crawler::Link &amp;link, sf::Http &amp;client, sf::Http::Request &amp;request)</div><div class="ttdoc">Gets called when a HTTP request is sent. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00084">Application.cpp:84</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_aa6bc95edeb44f9338224862365c812d5"><div class="ttname"><a href="class_crawler_1_1_application.html#aa6bc95edeb44f9338224862365c812d5">Crawler::Application::onDespawnWorker</a></div><div class="ttdeci">virtual void onDespawnWorker(Crawler::Worker &amp;worker)</div><div class="ttdoc">Gets called when a worker despawns. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00075">Application.cpp:75</a></div></div>
<div class="ttc" id="class_crawler_1_1_worker_html"><div class="ttname"><a href="class_crawler_1_1_worker.html">Crawler::Worker</a></div><div class="ttdef"><b>Definition:</b> <a href="_worker_8hpp_source.html#l00019">Worker.hpp:19</a></div></div>
<div class="ttc" id="class_crawler_1_1_website_html_ac9e3218e95e4121b730958d6f4d5ab88"><div class="ttname"><a href="class_crawler_1_1_website.html#ac9e3218e95e4121b730958d6f4d5ab88">Crawler::Website::setVisited</a></div><div class="ttdeci">void setVisited(bool visited)</div><div class="ttdoc">Changes if website was visited. </div><div class="ttdef"><b>Definition:</b> <a href="_website_8cpp_source.html#l00102">Website.cpp:102</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_a544d41cc0fb2b5f36b44480ea4a3b14f"><div class="ttname"><a href="class_crawler_1_1_application.html#a544d41cc0fb2b5f36b44480ea4a3b14f">Crawler::Application::onShutdown</a></div><div class="ttdeci">virtual void onShutdown()</div><div class="ttdoc">Gets called when application shuts down. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00067">Application.cpp:67</a></div></div>
<div class="ttc" id="_application_8hpp_html"><div class="ttname"><a href="_application_8hpp.html">Application.hpp</a></div></div>
<div class="ttc" id="class_crawler_1_1_application_html_acff7506553bf1a55dced63c1d0b1c2e4"><div class="ttname"><a href="class_crawler_1_1_application.html#acff7506553bf1a55dced63c1d0b1c2e4">Crawler::Application::getWebsiteManager</a></div><div class="ttdeci">Crawler::WebsiteManager &amp; getWebsiteManager()</div><div class="ttdoc">Returns website manager. </div><div class="ttdef"><b>Definition:</b> <a href="_application_8cpp_source.html#l00019">Application.cpp:19</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_74389ed8173ad57b461b9d623a1f3867.html">Source</a></li><li class="navelem"><a class="el" href="dir_07db96ce4b3001379d5b50a5cb9d08c0.html">Crawler</a></li><li class="navelem"><a class="el" href="_application_8cpp.html">Application.cpp</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
